<?php
class Admin extends CI_Controller
{
	function __construct()
	{
		parent::__construct();
		// autoload helper and library
		
		$this->layout->setLayout('admin');
		$auth = $this->session->userdata('auth');
		if(!$auth)
		{
			redirect('/auth/login');
		}
	}
	function index()
	{
		$auth = $this->session->userdata('auth');
		if(!$auth)
		{
			redirect('/auth/login');
		}
		else
		{
			redirect('user');
		}
	}
}